<?php
include "include/config.inc.php";
$documentId = array();
$documentName = array();
$m=0;
$accountId     = isset($_REQUEST['accountId']) ? $_REQUEST['accountId'] : 0;
$partyCode     = isset($_REQUEST['partyCode']) ? $_REQUEST['partyCode'] : "";
$addOn         = isset($_REQUEST['addOn']) ? $_REQUEST['addOn'] : "";
$accountName   = isset($_REQUEST['accountName']) ? $_REQUEST['accountName'] : "";
$address       = isset($_REQUEST['address']) ? $_REQUEST['address'] : "";
$gAddress      = isset($_REQUEST['gAddress']) ? $_REQUEST['gAddress'] : "";
$mobile        = isset($_REQUEST['mobile']) ? $_REQUEST['mobile'] : 0;
$photo         = isset($_REQUEST['photo']) ? $_REQUEST['photo'] : "";
$otherInfo     = isset($_REQUEST['otherInfo']) ? $_REQUEST['otherInfo'] : "";

$selectParty = "SELECT accountId, partyCode, accountName, address, mobile, photo, otherInfo
                  FROM account
                 WHERE accountId = ".$accountId;
$selectPartyRes = mysql_query($selectParty);
while($selectPartyRow = mysql_fetch_array($selectPartyRes))
{
  $accountId    =  $selectPartyRow['accountId'];
  $partyCode    =  $selectPartyRow['partyCode'];
  $accountName  =  $selectPartyRow['accountName'];
  $address      =  $selectPartyRow['address'];
  $mobile       =  $selectPartyRow['mobile'];
  $photo        =  $selectPartyRow['photo'];
  $otherInfo    =  $selectPartyRow['otherInfo'];
}

$smarty->assign("accountId",$accountId);
$smarty->assign("partyCode",$partyCode);
$smarty->assign("accountName",$accountName);
$smarty->assign("address",$address);
$smarty->assign("gAddress",$gAddress);
$smarty->assign("mobile",$mobile);
$smarty->assign("photo",$photo);
$smarty->assign("otherInfo",$otherInfo);
$smarty->assign("addOn",$addOn);
$smarty->display('enterNewPartyAjax.tpl');
?>
